<template>
  <div class="header">
    <div class="box">
      <van-tabbar v-model="active" @change="onChange">
        <van-tabbar-item class="iconfont icon-shouye">首页</van-tabbar-item>
        <van-tabbar-item class="iconfont icon-caidan">菜单</van-tabbar-item>
        <van-tabbar-item class="iconfont icon-gouwuche">购物车</van-tabbar-item>
        <van-tabbar-item class="iconfont icon-wodefill">我的</van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>


<style lang="scss" scoped>
.header {
  .box {
    .active {
      color: #2044bf;
    }
  }
}
</style>


<script>
import "../assets/fonts/iconfont.css";
export default {
  name: "myFooter",
  data(){
    return{
      active: 'home',
      tokenString:null,
    }
  },
  methods: {
    onChange(index) {
      Notify({ type: "primary", message: index });
    },
  },
   created() {
    if (!this.tokenString) {
      this.tokenString = window.localStorage.getItem("token_list");
      console.log(this.tokenString);
    } else {
      this.tokenString = null;
      console.log(this.tokenString);
    }
  },
};
</script>